package javacore.Statements;

public class ReturnArray {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		int[] test = reverseArray(new int[]{6, 11, 9, 0, 14, 2});
		PassingArrayToMethod.printArray(test);
		

	}

	public static int[] reverseArray(int[] list) {
	  int[] result = new int[list.length];

	  for (int i = 0, j = result.length - 1; i < list.length; i++, j--) {
	    result[j] = list[i];
	  }
	  return result;
	}
}
